<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
<!DOCTYPE html>

<%

    String Edtitorlink = "includes/js/graph/editor/";

    String srclink = "includes/js/graph/src/";

    String e1Floder = "general/";
    String e2Floder = "stateModel/";

%>
<html>
    <head>
        <title>Graph Editor</title>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="<%= Edtitorlink%>styles/grapheditor.css">
        <script type="text/javascript">
            // Public global variables
            var MAX_REQUEST_SIZE = 10485760;
            var MAX_WIDTH = 6000;
            var MAX_HEIGHT = 6000;

            // URLs for save and export
            var EXPORT_URL = '/export';
            var SAVE_URL = '/save';
            var OPEN_URL = '';
            var RESOURCES_PATH = '<%= Edtitorlink%>resources';
            var RESOURCE_BASE = RESOURCES_PATH + '/grapheditor';
            var STENCIL_PATH = '<%= Edtitorlink%>stencils';
            var IMAGE_PATH = '<%= Edtitorlink%>images';
            var STYLE_PATH = '<%= Edtitorlink%>styles';
            var CSS_PATH = '<%= Edtitorlink%>styles';
            var OPEN_FORM = '<%= Edtitorlink%>open.html';

            // Specifies connection mode for touch devices (at least one should be true)
            var tapAndHoldStartsConnection = true;
            var showConnectorImg = true;

            // Parses URL parameters. Supported parameters are:
            // - lang=xy: Specifies the language of the user interface.
            // - touch=1: Enables a touch-style user interface.
            // - storage=local: Enables HTML5 local storage.
            var urlParams = (function(url)
            {
                var result = new Object();
                var idx = url.lastIndexOf('?');

                if (idx > 0)
                {
                    var params = url.substring(idx + 1).split('&');

                    for (var i = 0; i < params.length; i++)
                    {
                        idx = params[i].indexOf('=');

                        if (idx > 0)
                        {
                            result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
                        }
                    }
                }

                return result;
            })(window.location.href);

            // Sets the base path, the UI language via URL param and configures the
            // supported languages to avoid 404s. The loading of all core language
            // resources is disabled as all required resources are in grapheditor.
            // properties. Note that in this example the loading of two resource
            // files (the special bundle and the default bundle) is disabled to
            // save a GET request. This requires that all resources be present in
            // the special bundle.
            mxLoadResources = false;
            mxBasePath = '<%= srclink%>';
            mxLanguage = urlParams['lang'];
            mxLanguages = ['de'];
        </script>
        <link href="style/style.css" rel="stylesheet">
        <script type="text/javascript" src="<%= srclink%>/js/mxClient.js"></script>

        <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>

        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e1Floder%>general.js"></script>


        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e2Floder%>Sidebar.js"></script>
        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e1Floder%>Editor.js"></script>
        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e2Floder%>Graph.js"></script>
        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e1Floder%>EditorUi.js"></script>

        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e2Floder%>Menus.js"></script>


        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e2Floder%>Actions.js"></script>
        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e1Floder%>Toolbar.js"></script>
        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e2Floder%>modelData.js"></script>
        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e1Floder%>Dialogs.js"></script>

        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e2Floder%>Dialogs.js"></script>



        <script type="text/javascript" src="<%= Edtitorlink%>js/<%= e1Floder%>moreV1.js"></script>




        <script type="text/javascript" src="<%= Edtitorlink%>jscolor/jscolor.js"></script>



    </head>


    <%
        String items = request.getParameter("items");
        String itemsStyles = request.getParameter("itemsstyles");
        String openstatus = request.getParameter("openstatus");

    %>

    <body >


        <div  id ="edit1"class="geEditor c1 cdiv">
            <script type="text/javascript">
            // Extends EditorUi to update I/O action states
            (function()
            {
                var editorUiInit = EditorUi.prototype.init;

                EditorUi.prototype.init = function()
                {
                    editorUiInit.apply(this, arguments);
                    this.actions.get('export').setEnabled(false);

                    // Updates action states which require a backend
                    if (!useLocalStorage)
                    {
                        mxUtils.post(OPEN_URL, '', mxUtils.bind(this, function(req)
                        {
                            var enabled = req.getStatus() != 404;
                            this.actions.get('open').setEnabled(enabled || fileSupport);
                            this.actions.get('import').setEnabled(enabled || fileSupport);
                            this.actions.get('save').setEnabled(enabled);
                            this.actions.get('saveAs').setEnabled(enabled);
                            this.actions.get('export').setEnabled(enabled);
                        }));
                    }
                };
            })();
            var myTextField = document.getElementById('edit1');

            var openstatus =<%=openstatus%>;

            new EditorUi(new Editor(), myTextField, "<%=items%>", "<%=itemsStyles%>", null, null, null, null, openstatus);



            </script>
        </div>


    </body>
</head>


</html>




<div class='valueupdate'> </div>


<div class="proects_p"> 
    <div class="proects">

    </div>
</div>

<div class='itmedata'></div>


<div class='moditmedata'> 
    <input type='hidden' value="" class='mmodmyitemdata' />
    <input type='hidden' value="" class='mToSystem' />
    <input type='hidden' value="" class='mFromSystem' />


</div>



<style>

</style>









